/**
 * 
 */
package com.gr.staffpm.tasks.model;

import org.apache.wicket.markup.html.form.IChoiceRenderer;

import com.gr.staffpm.datatypes.User;


/**
 * @author Graham Rhodes 23 Dec 2010 19:33:08
 */
public class UserChoiceRenderer implements IChoiceRenderer<User> {

    private static final long serialVersionUID = 1L;

    /* (non-Javadoc)
     * @see org.apache.wicket.markup.html.form.IChoiceRenderer#getDisplayValue(java.lang.Object)
     */
    @Override
    public String getDisplayValue(User user) {
        return user.getFullName();
    }

    /* (non-Javadoc)
     * @see org.apache.wicket.markup.html.form.IChoiceRenderer#getIdValue(java.lang.Object, int)
     */
    @Override
    public String getIdValue(User user, int index) {
        return String.valueOf(user.getUserId());
    }

}
